# ---------------------------------------------------------------------------
# Author: jachymko
# Desc:   Prompt function that displays current location in the window title
# Date:   Dec 23, 2006
# Site:   http://www.codeplex.com/PowerShellCX
# Usage:  In your profile place the following commands:
#  
#         . "$Env:PscxHome\Profile\EyeCandy.Jachym.ps1"
# ---------------------------------------------------------------------------


#
# Colors
#
if($IsAdmin) {
	$Global:PscxForeColor = 'White'
	$Global:PscxBackColor = 'DarkRed'
	$Global:PscxPromptColor = 'Gray'
	$Global:PscxRepeatPromptColor = 'DarkCyan'  
}
else {
	$Global:PscxForeColor = 'White'
	$Global:PscxBackColor = 'Black'
	$Global:PscxPromptColor = 'Yellow'
	$Global:PscxRepeatPromptColor = 'DarkCyan'
}

#
# Host Window Title
#
$Global:PscxHostTitlePreference = {
	
	if($IsAdmin) { '(Admin)' }
	
	'Microsoft Windows PowerShell'
	'-'
	(Get-Location)
}

#
# Prompt
#
$Global:PscxPromptPreference = {
	param($Id) 
	
	if($NestedPromptLevel) {
		new-object string ([char]0xB7), $NestedPromptLevel
	}
	
	"[$Id] $([char]0xBB)"
}

#
# Message of the Day
#
$Global:PscxMotDayPreference = {
	"PowerShell Community Extensions $($PscxVersion.ToString(2))"
	"Microsoft Windows PowerShell " + (Get-FileVersion "$PSHome\PowerShell.exe").ProductVersion
	""
	
	$user =	"Logged in on $([DateTime]::Now.ToString((get-culture))) as $($NTIdentity.Name)"
	
	if($IsAdmin) { $user += ' (Elevated!)' }
	else { $user += '.' }
	
	$user
}

. "$Env:PscxHome\Profile\EyeCandy.ps1"